.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-app {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background-color: #2e2f3c;

  .chat-container {
    display: flex;
    box-sizing: border-box;
    width: 1130px;
    height: calc(100vh - 60px - 90px);
    min-height: 560px;
    background-color: #fff;
    border-radius: 5px;
  }
}

.left-chat {
  width: 250px;
  flex-shrink: 0;
  border-right: 1px solid #E7E7E7;

  .user-info {
    box-sizing: border-box;
    padding: 10px;
    background: #FF534C;
    background-image: -webkit-linear-gradient(
                    229deg, #FF534C 0%, #FF3737 100%);
    background-image: -o-linear-gradient(229deg, #FF534C 0%, #FF3737 100%);
    background-image: linear-gradient(
                    -139deg, #FF534C 0%, #FF3737 100%);
    height: 104px;
    border-top-left-radius: 5px;

    .face-user {
      display: flex;
      width: 100%;
      height: 50px;

      .img-face-user {
        width: 50px;
        height: 50px;
        float: left;
        border-radius: 4px;
        overflow: hidden;
        background-size: 100% 100%;
        background-repeat: no-repeat;
      }

      .info-user {
        margin-left: 10px;

        .name-user {
          font-size: 18px;
          color: #ffffff;
          letter-spacing: 0;
          line-height: 20px;
          width: 160px;
        }
      }
    }

    .search-user {
      width: 230px;
      height: 24px;
      box-sizing: border-box;
      margin-top: 10px;

      .search-input-user {
        outline: 0 none;
        height: 24px;
        box-sizing: border-box;
        line-height: 24px;
        width: 100%;
        border-radius: 4px;
        border: 0;
        font-size: 12px;
        padding: 0 5px 0 30px;
        background: url('') no-repeat #ffffff 10px 5px;
      }
    }
  }

  .friend-list {
    width: 100%;
    height: calc(100% - 104px);
    overflow: hidden auto;

    .friend-item {
      position: relative;
      display: flex;
      align-items: center;
      box-sizing: border-box;
      height: 40px;
      padding: 10px;
      font-size: 13px;
      user-select: none;
      background-color: #F2F5F9;
      cursor: pointer;
      transition: all ease .2s;

      &:hover .icon-delete {
        display: block;
      }

      &.active {
        font-size: 14px;
        height: 50px;
        background-color: #D2E6F9;

        .face-friend {
          width: 30px;
          height: 30px;
        }
      }

      .face-friend {
        width: 20px;
        height: 20px;
        overflow: hidden;
        box-sizing: border-box;
        background-color: #fff;
        background-size: 100%;
        background-position: 0 50%;
        background-repeat: no-repeat;
        transition: all ease .2s;
      }

      .name-friend {
        display: inline-block;
        margin-left: 10px;
        line-height: 20px;
        width: 120px;
        color: #1C2229;
      }

      .unread-friend {
        position: absolute;
        right: 50px;
        font-size: 12px;
        border-radius: 2px;
        display: inline-block;
        padding: 0 4px;
        line-height: 16px;
        color: #ffffff;
        background: #F23030;
      }

      .icon-delete {
        position: absolute;
        display: none;
        right: 0;
        width: 50px;
        height: 100%;
        background-image: url('./icon-close.png');
        background-size: 12px 12px;
        background-position: 20px center;
        background-repeat: no-repeat;
        cursor: pointer;
      }
    }
  }
}

.right-chat {
  flex: 1;
  height: 100%;

  .head-right {
    width: 100%;
    height: 60px;
    background-color: #fafafa;
    position: relative;
    border-top-right-radius: 5px;

    .wrapper-head {
      display: flex;
      box-sizing: border-box;
      margin-left: 10px;
      padding-top: 10px;

      .face-head {
        width: 40px;
        height: 40px;
        border-radius: 3px;
        overflow: hidden;
        background-color: #fff;
        background-size: 100%;
        background-position: 0 50%;
        background-repeat: no-repeat;
      }

      .info-head {
        box-sizing: border-box;
        margin-left: 10px;
        padding-top: 3px;

        .name-info-head {
          font-size: 14px;
          line-height: 19px;
          color: #343036;
          position: relative;
        }

        .desc-info-head {
          color: #a1a6af;
          font-size: 12px;
          line-height: 16px;
        }
      }
    }
  }

  .body-right {
    position: relative;
    display: flex;
    height: calc(100% - 60px);
    .chat-right {
      position: relative;
      flex: 1;
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
      background-color: #fafafa;
      border-right: 1px solid #e7e7e7;
      &::after {
        content: '';
        position: absolute;
        top: 0;
        width: 100%;
        height: 1px;
        background-color: #e7e7e7;
      }
    }

    .actions-right {
      width: 330px;
      height: 100%;
      box-sizing: border-box;
      flex-shrink: 0;
      .tabs-actions {
        display: flex;
        box-sizing: border-box;
        width: 100%;
        height: 42px;
        background-color: #F8F8F8;
      }
      .tab-actions {
        flex: 1;
        box-sizing: border-box;
        height: 42px;
        line-height: 42px;
        border-top: 2px solid #F8F8F8;
        border-bottom: 1px solid #e7e7e7;
        text-align: center;
        color: #5A606B;
        font-size: 12px;
        cursor: pointer;
        user-select: none;
        border-top: 1px solid #e7e7e7;
        &.active {
          background-color: #fff;
          border-bottom: 0 none;
          color: #F23030;
          border-top: 2px solid #F23030;
        }
      }
      .content-actions {
        height: calc(100% - 42px);
        border-bottom-right-radius: 5px;
        overflow: hidden;
        position: relative;
        .tab-actions {
          cursor: auto;
          margin-top: 20px;
        }
        &>div {
          height: 100%;
        }
        .tip-load-more {
          display: flex;
          justify-content: center;
          align-items: center;
          width: 100%;
          height: 40px;
          margin-top: 10px;
          cursor: pointer;
          font-size: 14px;
          transition: all ease .2s;
          &:hover:not(.disabled) {
            background-color: #D7D7D7;
          }
          &.disabled {
            cursor: not-allowed;
            pointer-events: none;
          }
        }
      }
    }
  }
}

.list-chat {
  flex: 1;
  overflow: hidden auto;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 20px;
  background-color: #fff;
  .load-more {
    font-size: 12px;
    color: #5a606b;
    text-align: center;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
    &.no-data {
      cursor: not-allowed;
    }
  }
}
.scroll-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 130px;
  right: 20px;
  cursor: pointer;
  color: #ffffff;
  background-color: #81d4fa;
  padding: 2px 10px;
  border-radius: 3px 3px 0 0;
  animation: scroll-tip 1s;
  animation-iteration-count: infinite;
  .scroll-tip-icon {
    display: block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    background-repeat: no-repeat;
    background-size: cover;
    background-image: url('');
  }
}
@keyframes scroll-tip {
  0% { opacity: 1 }
  25% { opacity: 0.9 }
  50% { opacity: 0.7 }
  75% { opacity: 0.9 }
  100% { opacity: 1 }
}
.input-chat {
  box-sizing: border-box;
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: 130px;
  padding-bottom: 10px;
  background-color: #ffffff;
  border-top: 1px solid #e7e7e7;
  user-select: none;
  .toolbar-input-chat {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: 32px;
    margin-bottom: 5px;
    padding-top: 12px;
    padding-left: 20px;
    width: 100%;
    .btn-toolbar {
      display: inline-block;
      height: 20px;
      width: 20px;
      margin-right: 18px;
      cursor: pointer;
      background-size: 100%;
      background-position: center center;
      &.emoji {
        background-image: url('');
        &:hover {
          background-image: url('');
        }
      }
      &.image {
        background-image: url('');
        &:hover {
          background-image: url('');
        }
      }
      &.video {
        background-image: url('');
        &:hover {
          background-image: url('');
        }
      }
      &.audio-text {
        width: auto;
        height: auto;
        color: #0d58ef;
        font-size: 12px;
      }
      .btn-toolbar-input {
        display: none;
      }
    }
  }
  .textarea-chat {
    position: relative;
    width: 100%;
    /deep/ .emoji-img {
      width: 20px;
      height: 20px;
      display: inline-block;
      margin: 0 1px -2px;
      vertical-align: bottom;
    }
    .textarea-input {
      box-sizing: border-box;
      width: 100%;
      height: 56px;
      padding: 0 19px 0 19px;
      margin: 0;
      outline: 0;
      border: none;
      background-color: #fff;
      color: #252525;
      font-size: 13px;
      font-family: inherit;
      word-break: break-all;
      white-space: normal;
      overflow-y: auto;
    }
  }
  .send-chat {
    display: flex;
    justify-content: flex-end;
    .send-btn {
      position: relative;
      user-select: none;
    }
    .btn-send {
      box-sizing: border-box;
      height: 26px;
      padding: 0 12px;
      line-height: 26px;
      border-radius: 4px;
      text-align: left;
      font-size: 12px;
      cursor: pointer;
      background: #ffffff;
      color: #343036;
      border: 1px solid #d9d9d9;
      width: 60px;
      margin-right: 10px;
    }
    .send-btn-arrow {
      width: 0;
      height: 0;
      border: 5px solid transparent;
      border-top-color: #666666;
      border-top-width: 8px;
      position: absolute;
      left: 43px;
      top: 10px;
      cursor: pointer;
      border-radius: 2px;
      &::before {
        content: "";
        position: absolute;
        top: -20px;
        right: -12px;
        bottom: -10px;
        left: -6px;
      }
    }
    .send-keys {
      position: absolute;
      top: 28px;
      right: 10px;
      width: 120px;
      height: 60px;
      margin: 0;
      padding: 0;
      color: #343036;
      font-size: 12px;
      background: #FFFFFF;
      border: 1px solid #D9D9D9;
      border-radius: 3px;
      overflow: hidden;
      cursor: pointer;
      .send-key {
        position: relative;
        height: 30px;
        line-height: 30px;
        padding-left: 5px;
        letter-spacing: -0.29px;
        &:after {
          content: "";
          background-image: url('');
          background-size: 100% 100%;
          width: 12px;
          height: 12px;
          float: right;
          margin: 10px 4px 0 0;
        }
        &.active {
          background: #F23030;
          color: #FFFFFF;
        }
      }
    }
  }
  .emoji-chat {
    position: absolute;
    top: -225px;
    left: 5px;
    z-index: 2;
  }
}

.history-actions {
  overflow: hidden auto;
  background-color: #FAF9F9;
  padding: 10px 0;
  box-sizing: border-box;
  .history-goods {
    position: relative;
    width: 100%;
    height: 67px;
    padding: 0 10px;
    box-sizing: border-box;
    & + .history-goods {
      margin-top: 20px;
      &::before {
        content: '';
        position: absolute;
        top: -9px;
        left: 10px;
        width: calc(100% - 20px);
        border-top: 1px dashed #d7d7d7;
      }
    }
    .history-goods-link {
      display: flex;
    }
    .history-goods-image {
      width: 60px;
      height: 60px;
      border: 1px solid #F2F2F2;
    }
    .history-goods-name {
      display: inline-block;
      vertical-align: top;
      padding: 10px 0 0 10px;
      width: 214px;
      height: 38px;
      font-size: 12px;
      line-height: 14px;
      overflow: hidden;
      box-sizing: border-box;
      text-decoration: none;
      color: #5A606B;
      -o-text-overflow: ellipsis;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
    .send-btn {
      position: absolute;
      top: 40px;
      left: 82px;
      border-radius: 2px;
      font-size: 12px;
      display: inline-block;
      padding: 4px 11px;
      line-height: 15px;
      border: 1px solid #D9D9D9;
      background-color: #ffffff;
      color: #343036;
      cursor: pointer;
    }
  }
}
.orders-actions {
  overflow: hidden auto;
  background-color: #FAF9F9;
  .item-order {
    font-size: 12px;
    padding: 0 10px;
    color: #5a606b;
    line-height: 17px;
    margin-bottom: 10px;
    background: #ffffff;
  }
  .title-order {
    display: flex;
    justify-content: space-between;
    padding: 18px 0 8px;
    border-bottom: 1px solid #f2f2f2;
    letter-spacing: -1px;
    .date-order {
      color: #a1a6af;
    }
  }
  .products-order {
    cursor: pointer;
    .item-products {
      display: flex;
      padding-top: 11px;
      border-bottom: 1px solid #f2f2f2;
      padding-bottom: 15px;
    }
    .image-product {
      flex-shrink: 0;
      width: 80px;
      height: 80px;
      border: 1px solid #f2f2f2;
      box-sizing: border-box;
      .img-product {
        width: 100%;
        height: 100%;
      }
    }
    .info-product {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      margin-left: 10px;
      font-size: 12px;
      color: #1C2229;
      line-height: 20px;
      .name-product {
        height: 40px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        cursor: pointer;
      }
    }
  }
  .other-order {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    .price-order {
      font-size: 12px;
      margin-top: 2px;
      .price {
        color: #f02b2b;
      }
    }
  }
  .status-order {
    border-radius: 2px;
    font-size: 12px;
    display: inline-block;
    padding: 4px 11px;
    line-height: 15px;
    max-width: 60px;
    text-align: center;
    color: #f23030;
    background: #ffeded;
    &.send-btn {
      border: 1px solid #D9D9D9;
      background-color: #ffffff;
      color: #343036;
      cursor: pointer;
    }
  }
}

[contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}

.history-actions.is-seller {
  padding-top: 48px;
}

.search-goods {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 48px;
  padding: 5px 10px;
  background-color: #ffffff;
  .search-goods-input {
    width: 100%;
    height: 100%;
    outline: none;
    padding: 6px;
    border: #ccc 1px solid;
    box-sizing: border-box;
    color: #333333;
    font-size: 13px;
    border-radius: 4px;
  }
}
